﻿@using QunProject.Common;
@{
    ViewBag.Title = "个人中心";
    Layout = "~/Views/Shared/_Member.cshtml";
    var LoginMember = (QunProject.Model.member)ViewBag.LoginMember;
}

<div class="row p10 bcolor" style="overflow:auto;">
    <div class="layui-col-md12">
        <p style="font-size:16px;">个人基本信息</p>
        <hr />
    </div>
    <div class="layui-col-md12">
        <p>注册时间：<span class="c_aaa">@LoginMember.CreateTime</span></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>个人称呼：<span class="c_aaa">@LoginMember.Name</span></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>绑定手机：<span class="c_aaa">@LoginMember.Phone.SubPhoneStr()</span></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>个人编号：<span class="c_aaa">@LoginMember.Number</span></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>账号身份：<span class="c_aaa">@LoginMember.Identity</span></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>账号状态：<span class="c_aaa">@Enum.GetName(typeof(QunProject.Model.EnumHelper.MemberStates), LoginMember.States)</span></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>个人签名：<span class="c_aaa">@LoginMember.Introduce</span></p>
    </div>
</div>
<div class="row p10 bcolor" style="overflow:auto;margin-top:1px;" id="dot_count">
    <div class="layui-col-md12">
        <p style="font-size:16px;">个人统计</p>
        <hr />
    </div>
    <div class="layui-col-md12">
        <p>专题数量：<a href="/Member/Special@(ViewBag.Suffix)" class="href">Loading...</a></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>文章数量：<a href="/Member/Article@(ViewBag.Suffix)" class="href">Loading...</a></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>讨论数量：<a href="/Member/Discuss@(ViewBag.Suffix)" class="href">Loading...</a></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>回复数量：<a href="/Member/Reply@(ViewBag.Suffix)" class="href">Loading...</a></p>
    </div>
</div>

<script id="dot_tmp_count" type="text/x-dot-template">
    <div class="layui-col-md12">
        <p style="font-size:16px;">个人统计</p>
        <hr />
    </div>
    <div class="layui-col-md12">
        <p>专题数量：<a href="/Member/Special@(ViewBag.Suffix)" class="href">{{= it.specialCount }}</a></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>文章数量：<a href="/Member/Article@(ViewBag.Suffix)" class="href">{{= it.articleCount }}</a></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>讨论数量：<a href="/Member/Discuss@(ViewBag.Suffix)" class="href">{{= it.discussCount }}</a></p>
    </div>
    <div class="layui-col-md12 pt10">
        <p>回复数量：<a href="/Member/Reply@(ViewBag.Suffix)" class="href">{{= it.replyCount }}</a></p>
    </div>
</script>

<script>
    $(function () {
        $.post('/member/GetMemberIndexResult', {}, function (result) {
            var dotTmp = doT.template($("#dot_tmp_count").text());
            $("#dot_count").html(dotTmp(result.data));
        });
    });
</script>